function login() {
    const username =  $('.input_txt').val().trim()
    const password = $('.input_pass').val().trim()
    if(username && password){
        $.ajax({
            type: "post",
            url: "http://localhost:8080/api/v1/admin/user/login",
            data: {username,password},
            success: function (response) {
                if(response.code === 200){
                    window.localStorage.setItem('bignews_token', response.token)
                    window.location.href = './index.html'
                } else {
                    $('#loginModal').modal('show')
                    $('.modal-body').text(response.msg)
                }
            }
        });
    } else {
        $('#loginModal').modal('show')
        $('.modal-body').text('用户名或密码不能为空')
    }
}